\documentclass{beamer}
% [dvips] allows use of latex->dvips->ps2pdf instead of pdflatex

\usepackage{beamerthemesplit}
\usepackage{amsmath,amssymb,amsfonts,amsthm}

\usepackage{graphicx} %only include if using pictures with psfrag



\mode<presentation>
{
  %\usetheme{Berkeley}   % left bar
  %\usetheme{Antibes} % tree header
  %\usetheme{Boadilla}  % very plain
  %\usetheme{Warsaw}
  %\usetheme{Rochester} %
  %%\usetheme{Goettingen}  % right bar
  %\usetheme{Ilmenau}

  %\usepackage{beamerouterthemeshadow}
  %\usepackage{beamerouterthemesmoothtree}
  %\usepackage{beamercolorthemeorchid}
  %\usepackage{beamerinnerthemerounded}

  %\setbeamercovered{transparent}
  % comment out to completely hide covered material
}

% **** All themes: remove comment and find out which one you like!

%\usetheme{Warsaw}
\usetheme{Frankfurt} % I like it.
%\usetheme{Szeged}
%\usetheme{Singapore}
%\usetheme{Rochester}  % no menus at top
%\usetheme{Pittsburgh}
%\usetheme{Berlin}   % too much header/footer stuff
%\usetheme{Antibes}
%\usetheme{Bergen} % very large side margins
%\usetheme{Boadilla} % nice and simple
%\usetheme{boxes}
%\usetheme{Copenhagen}
%\usetheme{Darmstadt}
%\usetheme{default}
%\usetheme{Dresden}
%\usetheme{Goettingen}
%\usetheme{Hannover}
%\usetheme{Ilmenau}
%\usetheme{JuanLesPins}
%\usetheme{Luebeck}
%\usetheme{Madrid}
%\usetheme{Malmoe}
%\usetheme{Marburg}
%\usetheme{Montpellier}
%\usetheme{PaloAlto}

%You can also pick a color theme in addition to theme above.

%\usecolortheme{albatross}
%\usecolortheme{beetle}
%\usecolortheme{crane}
%\usecolortheme{dolphin}
%\usecolortheme{dove}
%\usecolortheme{fly}
%\usecolortheme{lily}
%\usecolortheme{seagull}
%\usecolortheme{seahorse}
%\usecolortheme{rose}


%\usefonttheme[onlylarge]{structuresmallcapsserif}


%\usepackage{times}
%\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\newtheorem{thm}{Theorem}




% ************************ space ************************************
\newcommand{\hhs}[1]{\hspace{#1mm}}
\newcommand{\hs}{\hspace{5mm}}
\newcommand{\vp}{\vspace{1mm}}
\newcommand{\vs}{\vspace{5mm}}
\newcommand{\jl}{$\frac{}{}$} %User defined for empty symbol to jump line
% ********************** newcommand *********************************
\newcommand{\mbf}[1]{\mbox{\boldmath $#1$}}
\newcommand{\hb}[1]{\hspace{-#1 mm}}
\newcommand{\ds}{\displaystyle}
\newcommand{\QED}{\hfill $\Box$}
% *********************** frequently used math symbols from AMS *******
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\newcommand{\set}[1]{\left\{#1\right\}}


\definecolor{Maroon}{rgb}{.5,.1,.25}% Used for Trinity University


\title[Quantile Regression]{Going beyond Models for the Conditional Mean}
%\title[Short Title]{Long Title}
\subtitle{An Introduction to Quantile Regression}


%\author[Name to appear in every slide]{Author name to appear in Title}
\author[Hengheng]{Hengheng Chen}


\institute[Virginia Tech]{%
    \textcolor{Maroon}{{Virginia Tech}}\\  %JUQI: Why large?
    Department of Economics
}


\date[Fifth Third Bank] % (optional, should be abbreviation of conference name)
{Fifth Third Bank, Fall 2011}
% - Either use conference name or its abbreviation.



\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%\section{Outline}
%\frame{\tableofcontents}

\section{Motivation}

\begin{frame}
  \frametitle{\Large\textbf{A Simple OLS Example}}
  \begin{equation*}
    \textbf{Y} = 3224 + 115.9 \times \textbf{I(gender = boy)} + ... + residual
  \end{equation*}

  \begin{itemize}
    \item Y: infant's birth weight (in grams)
    \item I(gender = boy): dummy variable which equals to one when infant's gender is male
  \end{itemize}

  \jl

  Therefore, OLS estimate $115.9$ implies:\\
  \begin{itemize}
    \item \emph{Ceteris paribus, boy's birth weight on average is higher than girl's by $115.9$ grams.}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{However, what if we are interested in ...}}
  \begin{itemize} %Juqi: Avoid red color, use large font instead
    \item \large{What is the difference of birth weight between boys and girls for those low birth-weight infants?}

    \jl

    \item \large{Is it the same as the average disparity $115.9$?}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{A Comprehensive and Robust Alternative}}
  Quantile Regression can
  \begin{itemize}
    \item Evaluate the effects of covariates at median, quartiles, percentiles, or even fractiles
    \item Test the difference of impacts from a covariate at different quantiles
  \end{itemize}

  \jl

  Quantile Regression is
  \begin{itemize}
    \item Less sensitive to modest amounts of outlier contamination
    \item Substantially outperforming the least squares estimator over a wide class of non-Gaussian error distributions
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Outline}}
  \tableofcontents
  % You might wish to add the option [pausesections] to display one at a time
\end{frame}

\section{Estimation}

\begin{frame}
  \frametitle{\Large\textbf{From Conditional Mean to Conditional Median}}
  OLS Estimator - Estimate of the conditional expectation function $E(Y|X)$
  \begin{itemize}
    \item $\displaystyle\min_{\beta\in\mathbb{R}}\sum_{i=1}^{n}(y_i-X_i\cdot\beta)^2$
  \end{itemize}

  \jl

  Similarly, what if we solve
  \begin{itemize}
    \item $\displaystyle\min_{\beta\in\mathbb{R}}\sum_{i=1}^{n}|y_i-X_i\cdot\beta|$ \hspace{1cm}$\mathbf{(1)}$
  \end{itemize}

  \jl

  Solution to the program (1) is the \textbf{Least Absolute Deviations (LAD) Estimator}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{From Conditional Median to Conditional Quantile}}
  Furthermore, we could extend the program (1) to
  \begin{itemize}
    \item $\displaystyle\min_{\beta\in\mathbb{R}}\{\sum_{i\in\{i: y_i\geq X_i\beta\}}\tau|y_i-X_i\beta|+\sum_{i\in\{i: y_i< X_i\beta\}}(1-\tau)|y_i-X_i\beta|\}$ $\mathbf{(2)}$
  \end{itemize}
  
  \jl
  
  Solution to the program (2) is the \textbf{Estimator of Quantile Regression}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Conditional Mean $\displaystyle\Rightarrow$ Median $\displaystyle\Rightarrow$ Quantile}}
  \begin{gather*}
  \min_{\beta\in\mathbb{R}}\sum_{i=1}^{n}(y_i-X_i\cdot\beta)^2 \\
  \Downarrow \\
  \textrm{}\min_{\beta\in\mathbb{R}}\sum_{i=1}^{n}|y_i-X_i\cdot\beta| \\
  \Downarrow \\
  \displaystyle\min_{\beta\in\mathbb{R}}\{\sum_{i\in\{i: y_i\geq X_i\beta\}}\tau|y_i-X_i\beta|+\sum_{i\in\{i: y_i< X_i\beta\}}(1-\tau)|y_i-X_i\beta|\}
  \end{gather*}
  
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Our Previous Example (Cont'd)}}
  The plot of quantile regression results for the simple OLS example
  \begin{figure}
    \includegraphics[height=5.5cm,width=9.5cm]{QRBOY_PNG.png}
  \end{figure}
  \tiny Note: The solid line with filled dots represents the 19 point estimates of the coefficient for $\tau$'s ranging from $0.05$ to $0.95$ and the dashed line represents the OLS estimate.
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Now, We Can Answer ...}}
  For our simple example
  \begin{itemize}
    \item The disparity between boys and girls is very small in the lower quantiles of the distribution

    \jl

    \item It is much smaller than the average in the lower quantiles but somewhat larger in the upper tail of the distribution
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Two Approaches to Estimate the Standard Errors}}
  Method 1: Asymptotic Covariance (Koenker and Bassett (1978))
  \begin{itemize}
    \item The limiting behavior of $\hat{\beta}(\tau)$ is Normal with covariance
    \begin{equation*}
    \omega^2(\tau)(X'X)^{-1}
    \end{equation*}
    where $\omega^2(\tau)=\frac{\tau(1-\tau)}{f^2(F^{-1}(\tau))}$ and $f(F^{-1}(\tau))$ denotes the density of the error distribution at $\tau^{th}$ quantile
    \item For non-identical-distributed observations, use the Huber-Eicker-White sandwich covariance
  \end{itemize}

  \jl

  Disadvantage: \\
  $f(F^{-1}(\tau))$ estimate is sensitive to the i.i.d. assumption 
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Two Approaches to Estimate the Standard Errors}}
  Method 2: Bootstrap
  \begin{itemize}
    \item Re-sample $(y, X)$
    \item Estimate $\hat{\beta}(\tau)$
    \item Repeat the procedure $\mathbf{B}$ times
    \item Calculate the standard errors or confidence interval
  \end{itemize}

  \jl

  Disadvantage: \\
  Approach to the empirical distribution of the sample.\\

  \jl
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{In summary...}}
  \begin{center}
    \large 
    \begin{tabular}{|c|c|}
      \hline
      % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
      \textbf{OLS} & \textbf{QR} \\
      \hline
      Not very robust & Robust \\
      \hline
      Unique solution & Multiple solutions \\
      \hline
      Mean & Quantiles \\
    \hline
    \end{tabular}
  \end{center}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Basic Tests}}
  Test the linear restriction
  \begin{equation*}
  H_0: \beta_i = 0
  \end{equation*}
  Note: $\beta_i$ is a subset of parameters with dimension $q$\\

  \jl

  The Wald Test and Likelihood Ratio Test are valid and asymptotically converge to $\chi^2_q$ under $H_0$!
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Test Statistics}}
  \begin{itemize}
    \item Wald Test
    \begin{equation*}
    T_w(\tau)=\hat{\beta_i}'(\tau)\hat{\Sigma(\tau)}^{-1}\hat{\beta_i}(\tau)
    \end{equation*}
    where

    \jl

    $\displaystyle{\hat{\Sigma(\tau)}=1/n\hat{\omega(\tau)}^2\Omega^{i,i}}$ and 
    $\displaystyle{\Omega^{i,i}=(\Omega_{i,i}-\Omega_{i,-i}\Omega_{-i,-i}^{-1}\Omega_{-i,i})^{-1}}$

  \end{itemize}

  \begin{itemize}
    \item Likelihood Ratio Test
    \begin{equation*}
    T_{LR}=2(\hat{\omega(\tau)})^{-1}(D_1(\tau)-D_0(\tau))
    \end{equation*}
    where $D_1(\tau)$ and $D_0(\tau)$ are objective function values in the restricted model and unrestricted model, respectively
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Software Packages}}
  \begin{itemize}
  \item STATA: ``QREG" command\\
  - Provide both bootstrap standard errors and asymptotic standard errors (based on i.i.d. error assumption)\\

\jl

\item SAS: ``QUANTREG" procedure - SAS 9.1 (Colin(Lin) Chen, SAS 213-30)\\
  - Provide non i.i.d. estimates of standard errors by default\\
  - Apply MCMB re-sample method to produce bootstrap standard errors\\

\jl

\item R: ``QUANTREG" library - \texttt{lib.stat.cmu.edu/R/CRAN}
\end{itemize}
\end{frame}

\section{Pitfalls}

\begin{frame}
  \frametitle{\Large\textbf{Evil Twins}}
  Heteroscedasticity
  \begin{itemize}
    \item Why? Personal preferences, economy growth, time flies ...
    \item How? Efficiency loss
    \item Remedy? Weighted Quantile Regression
  \end{itemize}

\jl

  Endogeneity
  \begin{itemize}
    \item Why? Unobserved factors, omitted variables, simultaneity ...
    \item How? Biased and inconsistent estimator
    \item Remedy? Two stage median regression
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Two Frienemies}}
  Outlier
  \begin{itemize}
    \item ``Bad outliers" are friends\\
      - Bounded influence and insensitivity \\
    \item ``Good outliers" are foes\\
      - Important extremes\\
  \end{itemize}

  \jl

  Sample Selection
  \begin{itemize}
    \item A more comprehensive understanding on the conditional distribution of the response
    \item No unified approach to sample selection bias for quantile regression
  \end{itemize}
\end{frame}

\section{Extensions}

\begin{frame}
  \frametitle{\Large\textbf{Duration Model with Quantile Regression}}
  \begin{itemize}
    \item A simple Cox proportional hazard model:
    \begin{equation*}
    h_i(t|X_i)=h_0(t)\cdot\exp{(X_i\beta)}.
    \end{equation*}
    Traditional estimation methods: Partial Likelihood and OLS\\

    \jl

    \item But, we actually can estimate
    \begin{equation*}
    \log{h_i(t|X_i)}=\log{h_0(t)}+X_i\beta+\epsilon
    \end{equation*}
    using quantile regression.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Nonlinear Model with Quantile Regression}}
  \begin{itemize}
    \item Consider:
    \texttt{\footnotesize
    \begin{equation*}
    \displaystyle\min_{\beta\in\mathbb{R}}\{\sum_{i\in\{i:y_i\geq\xi(X_i,\beta)\}}\tau|y_i-\xi(X_i,\beta)|+\sum_{i\in\{i:y_i<\xi(X_i,\beta)\}}(1-\tau)|y_i-\xi(X_i,\beta)|\} (\mathbf{P})
    \end{equation*}
    }\\
    where $\xi(X_i,\beta)$ is not linear in parameter vector $\beta$.

    \jl

    \item Only require for the effective algorithms to solve the optimization program $(\mathbf{P})$
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{\Large\textbf{Major Reference}}
  \begin{itemize}
  \item Koenker, Roger and Gilbert Bassett, Jr. 1978. ``Regression Quantiles," \emph{Econometrica}. Jan, pp. 33-50.

  \jl

  \item Koenker, Roger and Kevin F. Hallock. 2001. ``Quantile Regression," \emph{Journal of Economic Perspectives}. Fall, pp. 143-156.
  \end{itemize}
\end{frame}

\begin{frame}
  \hspace{4cm} \Large\textbf{Thank You!}
\end{frame}


\end{document} 